<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
   var r = prompt("输入半径")
     r = parseFloat(r)

     var z = 2*r * 3.14
     var m = r*r * 3.14
     
     console.log("周长："+z + " 面积：" + m)
    </script>
</body>
</html>